import 'package:flutter_test/flutter_test.dart';
import 'package:screen_brightness_ohos/screen_brightness_ohos.dart';
import 'package:screen_brightness_ohos/screen_brightness_ohos_platform_interface.dart';
import 'package:screen_brightness_ohos/screen_brightness_ohos_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockScreenBrightnessOhosPlatform
    with MockPlatformInterfaceMixin
    implements ScreenBrightnessOhosPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ScreenBrightnessOhosPlatform initialPlatform = ScreenBrightnessOhosPlatform.instance;

  test('$MethodChannelScreenBrightnessOhos is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelScreenBrightnessOhos>());
  });

  test('getPlatformVersion', () async {
    ScreenBrightnessOhos screenBrightnessOhosPlugin = ScreenBrightnessOhos();
    MockScreenBrightnessOhosPlatform fakePlatform = MockScreenBrightnessOhosPlatform();
    ScreenBrightnessOhosPlatform.instance = fakePlatform;

    expect(await screenBrightnessOhosPlugin.getPlatformVersion(), '42');
  });
}
